<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        var num = prompt('')
        var res = 0
        for (var j = 0; j < num.length; j++) {
            if (num.charAt(j) !== num.charAt(num.length - j - 1)) {
                res = false
                break
            } else {
                res = true
            }
        }
        if (res) {
            console.log(num + '是一个可回文字符串')
        } else {
            console.log(num + '不是一个可回文字符串')
        }
    </script>
</body>

</html>